import tornado
from tornado.web import url

import settings
from app.controller import user_controller, index_controller
from app.api_controller import api_user_controller, api_index_controller, api_video_controller, api_goods_controller

urls = [
    # url(r'/user/get', user_controller.UserGet),
    # url(r'/user/add', user_controller.UserAdd),
    # url(r'/user/delete', user_controller.UserDelete),
    # url(r'/user/login', user_controller.UserLogin),
    # url(r'/user/list', user_controller.UserList),
    # url(r'/user/modify', user_controller.UserModify),

    # url(r'/login', user_controller.Login),
    # url(r'/', index_controller.Index),
    url(r'/api/login', api_user_controller.Login),
    # 获取banner
    url(r'/api/banner', api_index_controller.Banner),
    # 获取视频列表，可以根据tag_id来查询
    url(r'/api/video-list', api_index_controller.IndexVideos),
    url(r'/api/video-city', api_index_controller.City),
    # 视频详情，根据视频id
    url(r'/api/video-detail', api_index_controller.VideoDetail),
    # 视频查询，根据title
    url(r'/api/video-search', api_index_controller.VideoSearch),
    url(r'/api/video-rel', api_index_controller.VideoRel),
    url(r'/api/video-play', api_index_controller.VideoPlay),
    url(r'/api/video-order-create', api_video_controller.VideoOrderCreate),
    url(r'/api/video-order-modify', api_video_controller.VideoOrderModify),
    url(r'/api/video-order-detail', api_video_controller.VideoOrderDetail),
    url(r'/api/video-order-pay', api_video_controller.Pay),
    url(r'/api/video-order-notify', api_video_controller.PayNotify),
    url(r'/api/goods-list', api_goods_controller.GoodList),
    url(r'/api/goods-detail', api_goods_controller.GoodDetail),
    url(r'/api/goods-comment', api_goods_controller.CommentList),
    url(r'/api/goods-top', api_goods_controller.GoodTop),
    # 获取所有标签
    url(r'/api/all-tags', api_index_controller.AllTags),
    # 系统健康检查使用
    url(r'/api/health-check', api_index_controller.Health),
    # 拍片获取视频类型
    url(r'/api/video-type', api_video_controller.VideoTypeList),
    # 拍片获取视频时长
    url(r'/api/video-time', api_video_controller.VideoTimeList),
    # 获取所有视频拍摄因素
    url(r'/api/video-price', api_video_controller.VideoPrice),
    #

    url(r'/static/*', tornado.web.StaticFileHandler, dict(path=settings.TORNADO_ENV['static_path'])),
]
